import './App.css';
import { Route } from 'react-router-dom'
import Login from './pages/login/Login'
import MyView from './router'
import { connect } from 'react-redux'

function App(props) {
  return (
    <div className="App"> 
      <Route path="/login" component = { Login }/>
      <MyView router = { props.routerList }/>
    </div>
  );
}

let mapStateToProps = (state) => {
  const { routerList } = state
  return {
      routerList
  }
}

App = connect(mapStateToProps)(App)

export default App;
